<?php

namespace App\Http\Controllers\Api;

use App\Model\OperationLogs;
use App\Model\Users;
use Illuminate\Http\Request;

class OperationLogsController extends BaseController
{
    public function __construct(Request $request)
    {
        parent::__construct($request);
        $this->model = new OperationLogs();
    }

    /**
     * 数据列表
     */
    public function list(Request $request)
    {
        $list = $this->model->getList($request);
        return $this->toJson(self::SUCCESS,$list);
    }

    /**
     * 功能列表
     */
    public function cates(Request $request)
    {

        return $this->toJson(self::SUCCESS, $this->model->getCates());
    }

    /**
     * 操作员列表
     */
    public function users(Request $request)
    {
        return $this->toJson(self::SUCCESS, (new Users())->getAdmins());
    }
}
